All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.io.InputStream | +----java.io.FilterInputStream | +----com.sun.java.swing.ProgressMonitorInputStream
InputStream in = new BufferedInputStream( new ProgressMonitorInputStream( parentComponent, "Reading "+fileName, new FileInputStream(fileName)));
This creates a progress monitor to monitor the progress of reading the input stream. If it's taking a while, a ProgressDialog will be popped up to inform the user. If the user hits the Cancel button an InterruptedIOException will be thrown on the next read. All the right cleanup is done when the stream is closed.
public ProgressMonitorInputStream(Component parentComponent, Object message, InputStream in)
public ProgressMonitor getProgressMonitor()
public int read() throws IOException
public int read(byte b[]) throws IOException
public int read(byte b[], int off, int len) throws IOException
public long skip(long n) throws IOException
public void close() throws IOException
public synchronized void reset() throws IOException
All Packages Class Hierarchy This Package Previous Next Index